package com.guigui.gulimall.ware.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.guigui.common.utils.PageUtils;
import com.guigui.gulimall.ware.dto.MergeReceiveDto;
import com.guigui.gulimall.ware.dto.PurchaseDoneDto;
import com.guigui.gulimall.ware.entity.PurchaseEntity;

import java.util.List;
import java.util.Map;

/**
 * 采购信息
 *
 * @author xin
 * @email 806748502@qq.com
 * @date 2021-07-23 16:07:56
 */
public interface PurchaseService extends IService<PurchaseEntity> {

    PageUtils queryPage(Map<String, Object> params);

    /**
     * 查询还为分配的采购单
     * @param params 分页查询
     */
    PageUtils queryUnreceiveList(Map<String, Object> params);

    /**
     * 合并采购单
     * items: [1, 2]
     * purchaseId: 1 为空时表示新建
     */
    void mergeReceive(MergeReceiveDto mergeReceiveDto);

    /**
     * 领取采购单[采购单，采购单]
     */
    void receive(List<Long> purchaseId);

    /**
     * 完成采购单
     */
    void purchaseDone(PurchaseDoneDto purchaseDoneDto);
}

